﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace GameJamKingdom
{
    class LavaBlock : GridObject
    {
        AnimatedComponent lavaAnim;

        public LavaBlock(Game1 cGame)
        {
            type = "lava";
            maxPerColumn = 3;
            lavaAnim = new AnimatedComponent("lavaAnim", "lava", 31, 30, cGame);
        }

        public override void update(GameTime cTime)
        {
            lavaAnim.update(cTime);
        }

        public override void render(Rectangle cRect, SpriteBatch spriteBatch)
        {
            lavaAnim.render(cRect, spriteBatch);
        }

        public override bool testTime(Mode cMode, int lastTime)
        {
            if (lastTime > cMode.speed)
                return true;
            else
                return false;
        }
    }
}
